package com.young.cms.model;

import com.young.interfaces.ums.model.Navigate;

/**
 * 快捷菜单创建
 *
 * @author wangjy
 * @date 2022/02/02 14:26:23
 */
public class GenCreateMenuVO {
    /**
     * 菜单名
     */
    private String name;
    /**
     * 链接
     */
    private String href;
    /**
     * 父id
     */
    private String parentId;
    /**
     * 图标
     */
    private String icon;
    /**
     * 显示顺序
     */
    private Integer num;

    /**
     * 类型转换
     * @return
     */
    public Navigate toNavigate() {
        Navigate navigate = new Navigate();
//        navigate.setId();
        navigate.setName(this.name);
        navigate.setHref(this.href);
        navigate.setParentId(this.parentId);
        navigate.setIcon(this.icon);
//        navigate.setType();
//        navigate.setLevel();
        navigate.setNum(this.num != null ? this.num : 100);
        return navigate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }
}
